<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const a = "say";
      const b = "hi";
      class Person {
        // sayHi() {}
        // 计算方法名
        ["say" + "Hi"]() {}
        ["say" + b]() {}
        [a + "Hi"]() {}
        [a + b]() {}
      }
    </script>
  </body>
</html>
